home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / getjusage.z / getjusage
Encoding:
Text File  |  2002-10-03  |  3.4 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ggggeeeettttjjjjuuuussssaaaaggggeeee((((2222))))                                                      ggggeeeettttjjjjuuuussssaaaaggggeeee((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      getjusage - get job usage information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh>>>>
  13.  
  14.      iiiinnnntttt ggggeeeettttjjjjuuuussssaaaaggggeeee((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt jjjjoooobbbbrrrruuuussssaaaaggggeeee ****uuuupppp))))
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _g_e_t_j_u_s_a_g_e function retrieves the resource usage values for the
  18.      specified job ID.  If the _j_i_d parameter is zero, usage values for the
  19.      current job will be returned.  If _j_i_d is non-zero, it represents the job
  20.      ID of the job for which usages values are retrieved.  The _r_e_s_o_u_r_c_e
  21.      parameter specifies the resource for which the usage values are returned.
  22.      Allowable values are taken from the JLIMIT_xxx macros found in the
  23.      ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh file.  For example, the JLIMIT_CPU macro is for cpu time.
  24.      The _u_p parameter points to a _j_o_b_r_u_s_a_g_e structure in the user program
  25.      where the usage values will be returned.
  26.  
  27.      If the job ID of the caller is different from job specified by _j_i_d, the
  28.      real or effective user ID of the caller must match the user ID of the
  29.      user associated with the job.  User association is established by the
  30.      _u_s_e_r parmater for _mmmm_aaaa_kkkk_eeee_nnnn_eeee_wwww_jjjj_oooo_bbbb.  Otherwise, the _g_e_t_j_u_s_a_g_e function checks
  31.      for the CAP_MAC_READ capability.  See the capability(4) and
  32.      capabilities(4) man pages for more information on the capability
  33.      mechanism that provides fine grained control over the privileges of a
  34.      process.
  35.  
  36. EEEERRRRRRRROOOORRRRSSSS
  37.      Under the following conditions, the _gggg_eeee_tttt_jjjj_uuuu_ssss_aaaa_gggg_eeee function fails and sets
  38.      _e_r_r_n_o to:
  39.  
  40.      [ENOPKG]       The job limits software is not installed.
  41.  
  42.      [ENOJOB]       A job with the specified job ID cannot be found.
  43.  
  44.      [EINVAL]       The limit denoted by _r_e_s_o_u_r_c_e is invalid.
  45.  
  46.      [EPERM]        The caller does not have permission to access the usage
  47.                     information.
  48.  
  49.      [EFAULT]       The the address of _u_p is invalid.
  50.  
  51. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  52.      getjlimit(2), getrusage(3).
  53.  
  54. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  55.      Upon successful completion, _g_e_t_j_u_s_a_g_e returns a value of 0.  Otherwise, a
  56.      value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the error.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.